package tomsung.cloud.agdc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tomsung.cloud.agdc.bean.Province;
import tomsung.cloud.agdc.dao.ProvinceMapper;

@Service("ProvinceService")
public class ProvinceService {

	@Autowired
	ProvinceMapper provinceMapper;
	
	public int createAddress(Province record)
	{
		return provinceMapper.insertSelective(record);
	}
	
	public int deleteProvince(Integer id)
	{
		return provinceMapper.deleteByPrimaryKey(id);
	}
	
	public Province selectProvince(Integer id)
	{
		return provinceMapper.selectByPrimaryKey(id);
	}
	
	public int updateProvince(Province record)
	{
		return provinceMapper.updateByPrimaryKey(record);
	}
	
	public List<Province> getAllProvinces()
	{
		return provinceMapper.getAllProvinces();
	}
	
	public List<Province> getProvincesByIds(List<Integer> proIds)
	{
		return provinceMapper.getProvincesByIds(proIds);
	}
}
